home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Game-Power
/
Amiga Game-Power.iso
/
anwendungen
/
v draw
/
animation
/
iffdump.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-20
|
3KB
|
117 lines
/*
* IFF.H
*
* Chunk:
* char id[4]
* long cksize;
* uchar ckdata[cksize];
* [0 pad to word boundry]
*
* Property = Chunk
* FORM = Chunk / data = formtype + N-subchunks
*
* CAT = Chunk / data = type + list of chunks: FORM LIST or CAT
* LIST = Chunk / data = type + N-Props + N(FORM LIST CAT)
* PROP = Chunk / data = formtype + property
*
*
* ILBM = FORM(ILBM): BMHD [CMAP][GRAB][DEST][SPRT][CAMG][CRNG+][BODY]
*
*/
#include <exec/types.h>
#define MAKEID(a,b,c,d) (((long)a)<<24L | ((long)b)<<16L | ((long)c)<<8 | (d))
#define IFF_FORM MAKEID('F','O','R','M')
#define IFF_LIST MAKEID('L','I','S','T')
#define IFF_PROP MAKEID('P','R','O','P')
#define IFF_CAT MAKEID('C','A','T',' ')
#define IFF_FILLER MAKEID(' ',' ',' ',' ')
#define TYPE_ILBM MAKEID('I','L','B','M')
#define TYPE_FTXT MAKEID('F','T','X','T')
#define ILBM_BMHD MAKEID('B','M','H','D') /* PROP */
#define ILBM_ANHD MAKEID('A','N','H','D') /* PROP */
#define ILBM_CMAP MAKEID('C','M','A','P') /* PROP */
#define ILBM_GRAB MAKEID('G','R','A','B') /* PROP */
#define ILBM_DEST MAKEID('D','E','S','T') /* PROP merging */
#define ILBM_SPRT MAKEID('S','P','R','T') /* PROP body is sprite */
#define ILBM_CAMG MAKEID('C','A','M','G') /* PROP VP mode */
#define ILBM_CRNG MAKEID('C','R','N','G') /* PROP color cycling */
#define ILBM_BODY MAKEID('B','O','D','Y') /* bit mapped body */
/* STRUCTURES */
typedef struct {
long id;
long cksize;
} CHUNK;
#define MA_NONE 0 /* masking */
#define MA_HASMASK 1
#define MA_HASTRANSCOLOR 2
#define MA_LASSO 3
#define CP_NONE 0 /* compression */
#define CP_BYTERUN1 1
typedef struct {
UBYTE operation; /* =0 for set, =1 for XOR, =2 long dlta, =3 short dlta */
UBYTE mask; /* mask,w,h,x,y used for XOR mode only */
UWORD w,h;
WORD x,y;
ULONG abstime; /* for timing w.r.t. start of anim file in jiffies - unused */
ULONG reltime; /* for timing w.r.t. last frame in jiffies */
UBYTE interleave; /* =0 for XORing to two frames back, =1 for last frame */
UBYTE pad[21]; /* reserved for Jim Kent for an op array and plane destination.
Actually Jims use will only be 16 bytes probably - other
five are for general future use */
} X_ANHD;
typedef struct {
UWORD w, h;
WORD x, y;
UBYTE planes;
UBYTE masking;
UBYTE compression;
UBYTE pad1;
UWORD transparent_color;
UBYTE xaspect, yaspect;
WORD pagewidth, pageheight;
} X_BMHD;
typedef UBYTE X_CMAP[3]; /* each map entry is 3 bytes */
typedef UWORD X_GRAB[2]; /* grab entry x, y */
typedef struct {
UBYTE depth;
UBYTE pad1;
UWORD p_pick;
UWORD p_onoff;
UWORD p_mask;
} X_DEST;
typedef UWORD X_SPRT; /* precedence */
typedef struct {
ULONG vpmodes;
} X_CAMG;
typedef struct {
WORD count;
WORD rate;
WORD flags;
UBYTE low, high;
} X_CRNG;